<?php
include "header.php";
$_REQUEST['menu']="home";
include "include.php";
include "menu.php";
?>
<div id="page">
	<div id="content">
		<div class="post">
		<p class="meta">program info</p>
		<div class="entry">
		<?php
		$table_name="program_name";
		$display_program_info=dbselectall($table_name);
		$tabid = "display_program_info";
		$tabth = array("id","program_name","program_info","create date","status","profile");
		$tabtd = array();//
		for($i=0; $i < sizeof($display_program_info); $i++){
		$program_tab_cmd_nm=$display_program_info[$i]['program_name']."_cmd";
		if ($display_program_info[$i]['status'] == 0 ){
		$status_url="<a href='profile.php?profile_active=0&tabname=".$program_tab_cmd_nm."&program_id=".$display_program_info[$i]['id']."'>new proflie</a>";
		}else{
		$status_url="<a href='profile.php?profile_active=1&tabname=".$program_tab_cmd_nm."&program_id=".$display_program_info[$i]['id']."'>edit profile</a>";
		}
		$display_program_info_rew=array_values($display_program_info[$i]);
		array_push($display_program_info_rew,$status_url);
		array_push($tabtd,$display_program_info_rew);
		}
		#$tabtd = array("test","test","tsest","test","test","tsest");
		echotable($tabid,$tabth,$tabtd);
		?>
		</div>
		</div>
		<div class="post">
		<p class="meta">add program name</p>
		<div class="entry">
		<form id="program_name" action="config_manager_actives.php" method="post">
		<table id="program_name">
		<tr>
		<td>program name</td>
		<td><input name="program_name" size=30></td>
		</tr>
		<tr>
		<td>program info</td>
		<td><textarea name="program_info" rows="15" cols="35"></textarea></td>
		</tr>
		<tr>
		<td><input style="visibility:hidden" name="home_active" value="add_program_name"></td>
		<td><input type="submit" value="add program"></td>
		</tr>
		</table>
		</form>
		</div>
		</div>
	</div>
	
	<div id="sidebar">
		<ul>
		<li>
		<!--<h2>program name<h2>
		<ul>
		<li><span>01.04.2010</span><a href='#'>test</a></li>
		</ul>-->
		</li>
		</ul>
	</div>
	<div style="clear: both;">&nbsp;</div>
</div>
<?php
include "footer.php";
?>
